package cn.ad.server.common.exception;

public class AdServerException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2180576697178179734L;

	private final String code;
	
	public AdServerException(String code, String message) {
		super(message);
		this.code = code;
	}

	public AdServerException(String message) {
		this(null, message);
	}

	public AdServerException(String message, Throwable t) {
		super(message, t);
		this.code = null;
	}

	public String getCode() {
		return code;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Throwable#getMessage()
	 */
	@Override
	public String getMessage() {
		return super.getMessage();
	}
}
